# 通过占位的方式，来完成拼接字符串的
a = "100"
message = "a = %s" % a
print(message)

a = 10
b = 10
message = "a = %s, b = %s" % (a, b)
print(message)

name = "Joy"
age = 19
height = 172.5
message = "name: %s, age: %d, height: %f" % (name, age, height)
print(message)

# 字符串的快速格式化
name = "Joy"
age = 19
height = 172.5
# f : format，这种格式化不理会类型，不做精度控制
print(f"name: {name}, age: {age}, height: {height}")

# 对表达式进行格式化
print("10 + 20 = %d" % (10 + 20))
print(f"10 * 20 = {10 * 20}")
print("字符串的类型名是 %s" % type("字符串"))
